# Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html

import scrapy


class global_stock_indices(scrapy.Item):

    # Global_stock_indices

    country_name = scrapy.Field() # 国家名称
    latest_price = scrapy.Field() # 最新价
    rising_falling_amounts = scrapy.Field() # 涨跌额
    percentage_change = scrapy.Field() # 涨跌幅
    opening_price = scrapy.Field() # 开盘价
    maximum_price = scrapy.Field() # 最高价
    bottom_price = scrapy.Field() # 最低价
    closing_price = scrapy.Field() # 昨收价
    amplitude = scrapy.Field() # 振幅





if __name__=="__main__":
    # 创建对象
    my_object =global_stock_indices()

    # 获取对象的类型名称
    class_name = type(my_object).__name__
    print(class_name)  # 输出: MyClass
    # 获取对象的所有属性和方法名称列表
    attributes_list = my_object.fields.keys()
    print(attributes_list)
